# -*- coding: utf-8 -*-
"""
Created on Thu May 23 10:40:44 2024

@author: 48848
"""

"""
计算最大公约数
"""
def zdgys(x,y):
    if x < y:
       temp = x
       x = y
       y = temp
    bs = y
    # x和y同时取余一个数都=0时退出循环
    while(1):
        bs -=1
        if x % bs == 0 and y % bs == 0:
            break
    return bs